<!-- thanh toolbar -->
<?php $this->placeholder('toolbar')->captureStart();?>
<?php echo $this->partial('index/toolbar/save-order.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/publish.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/unpublish.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/new.phtml', 'admin', array($this->url(array('action' => 'insert')))) ?>
<?php echo $this->partial('index/toolbar/edit.phtml', 'admin', array($this->url(array('action' => 'update')))) ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/trash.phtml', 'admin', array($this->url(array('action' => 'delete')))) ?>
<?php $this->placeholder('toolbar')->captureEnd();?>
<!-- / --> 
<style type="text/css">
	td.level_0, td.level_1, td.level_2, td.level_3, td.level_4, td.level_5 {  }
	td.level_0 div {  }
	td.level_1 div { font-size: 15px; }
	td.level_2 div { font-size: 16px }
	td.level_3 div { font-size: 17px }
	td.level_4 div { font-size: 18px }
	td.level_5 div { font-size: 19px }
</style>
<form id='adminForm' name='adminForm' method='post' action=''>

	<!-- phần tìm kiếm -->
	<fieldset id='filter-bar' style='height: auto'>
		<?php /*echo $this->partial('index/search/layout.phtml', 'admin',array (  	
			 $this->partial('index/search/search.phtml', 'admin',array('label'=>$this->captions,'value'=>$this->product_group_code,'name'=>'product_group_code')),
			 $this->partial('index/search/search.phtml', 'admin',array('label'=>$this->captions,'value'=>$this->product_group_name,'name'=>'product_group_name')),
			 $this->partial('index/search/submit.phtml', 'admin') 
		 ));*/ ?>
		<?php /*echo $this->partial('index/filter/layout.phtml', 'admin',array (		
			$this->partial('index/filter/publish.phtml', 'admin',array('name'=>'product_group_status','value'=>$this->product_group_status)) 
		 ));*/ ?>		 
	</fieldset>	
	<!-- / -->
	
	<!-- danh sách hiển thị -->
	<div class='clr'> </div>
	<table class='adminlist'>
		<thead>			
			<tr>
				<?php echo $this->partial('index/manage/save-order.phtml', 'admin', array('column'=>'product_group_order')); ?>
				<?php echo $this->partial('index/manage/checkbox-all.phtml', 'admin'); ?>				
				<th>
					<?php echo $this->partial('index/manage/caption.phtml','admin',array('caption'=>$this->captions,'column'=>'product_group_code')); ?>
				</th>
				<th>
					<?php echo $this->partial('index/manage/caption.phtml','admin',array('caption'=>$this->captions,'column'=>'product_group_name')); ?>
				</th>
				<!--  <th> -->
				<!-- 	<?php echo $this->partial('index/manage/caption.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_group_code')); ?> -->
									
				<!-- </th> -->
								
				<th>
					<?php echo $this->partial('index/manage/caption.phtml','admin',array('caption'=>$this->captions,'column'=>'product_group_note')); ?>
				</th>
				
				<th width='80px'>
					<?php echo $this->partial('index/manage/caption.phtml','admin',array('caption'=>$this->captions,'column'=>'product_group_status')); ?>
				</th>
				<th width='80px'>
					Quản lý
				</th>
			</tr>
		</thead>
		<tbody>
		<?php if (count($this->paginator) > 0): $no=0;?>
		<?php foreach ($this->paginator as $row): ?>
			<?php $temp = '' ?>
			<?php for ($i = 0; $i <= (int)$row->product_group_level; $i++): ?>
				<?php $temp .= '<span class="gi">|&mdash;</span>'; ?>
			<?php endfor ?>
			<tr class='row<?php echo ($no++)%2 ?>'>
				<?php echo $this->partial('index/manage/orderer.phtml', 'admin', array($row->product_group_id, $row->product_group_order)) ?>
				<?php echo $this->partial('index/manage/checkbox.phtml', 'admin', array($row->product_group_id)) ?>
				<td class="is_code">
					<?php echo $row->product_group_code ?>
				</td>
				<td class="level_<?php echo $row->product_group_level ?>" >
					<?php echo $temp . $row->product_group_name ?> 
				</td>
				<!--  <td class='left'>-->
					<!-- <?php echo $row->product_group_warehouse_group_code; ?>-->
				<!-- </td>-->
				<td class='left'>
					<?php echo $row->product_group_note; ?>
				</td>
				<td class='center'>
					<?php echo $this->partial('index/manage/publish.phtml','admin', array($this->url(array('action' => 'publish')),$row->product_group_status)); ?>	
				</td>
				<td class='center'>
					<?php echo $this->partial('index/manage/detail.phtml','admin', array($this->url(array('action' => 'detail','id'=>$row->product_group_id)))); ?>				
					<?php echo $this->partial('index/manage/edit.phtml','admin', array($this->url(array('action' => 'update','id'=>$row->product_group_id)))); ?>
					<?php echo $this->partial('index/manage/trash.phtml','admin', array($this->url(array('action' => 'delete')))); ?>	
				</td>
			</tr>
		<?php endforeach; ?>
		<?php endif; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan='8'>
					<div class='container'>
						<?php echo $this->paginationControl($this->paginator) ?>
					</div>
				</td>
			</tr>
		</tfoot>
	</table>
	<!-- / -->

</form>